﻿<UserControl x:Class="CatalogModule.Views.CauLacBoView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:prism="http://www.codeplex.com/prism"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:inf_int="clr-namespace:Infrastructure.InteractionRequests;assembly=Infrastructure"
             xmlns:local="clr-namespace:CatalogModule.Views"
             mc:Ignorable="d" 
             d:DesignHeight="720" d:DesignWidth="900" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation">

    <i:Interaction.Triggers>
        <!--<prism:InteractionRequestTrigger SourceObject="{Binding ConfirmationRequest, Mode=OneWay}">
            <inf_int:PopupWindowAction IsModal="True" CenterOverAssociatedObject="True"/>
        </prism:InteractionRequestTrigger>

        <prism:InteractionRequestTrigger SourceObject="{Binding NotificationRequest, Mode=OneWay}">
            <inf_int:PopupWindowAction CenterOverAssociatedObject="True"/>
        </prism:InteractionRequestTrigger>

        <prism:InteractionRequestTrigger SourceObject="{Binding SelectItemRequest, Mode=OneWay}">
            <inf_int:PopupWindowAction IsModal="True" CenterOverAssociatedObject="True">
                <inf_int:PopupWindowAction.WindowContent>
                    <local:SelectItemView />
                </inf_int:PopupWindowAction.WindowContent>
            </inf_int:PopupWindowAction>
        </prism:InteractionRequestTrigger>-->

        <prism:InteractionRequestTrigger SourceObject="{Binding AddNewRequest, Mode=OneWay}">
            <inf_int:PopupWindowAction CenterOverAssociatedObject="True">
                <inf_int:PopupWindowAction.WindowContent>
                    <local:AddCauLacBoView />
                </inf_int:PopupWindowAction.WindowContent>
            </inf_int:PopupWindowAction>
        </prism:InteractionRequestTrigger>
    </i:Interaction.Triggers>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <StackPanel>
            <TextBlock Margin="40,10,0,0" Text="Quản lý câu lạc bộ" 
                       FontWeight="Bold" Foreground="#FF7A7A7A" HorizontalAlignment="Left"  FontFamily="Segoe UI" FontSize="16" />
            <Rectangle Fill="#FFD6D6D6" Height="1" Margin="0,10 0,15" />
        </StackPanel>

        <StackPanel Grid.Row="1" HorizontalAlignment="Center"
					Margin="10">
            <StackPanel Orientation="Horizontal" Margin="5" VerticalAlignment="Center">
                <telerik:RadButton Width="38" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                                   Command="{Binding SaveCommand}">
                    <telerik:RadButton.Content>
                        <Image Source="/Infrastructure;component/Images/MiniIcon/save_as.png" Height="14" Width="14"/>
                    </telerik:RadButton.Content>
                </telerik:RadButton>
                <TextBlock Text="Lưu danh sách" Foreground="#FF060606" FontSize="12" Margin="40 3 14 3" />
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="5" VerticalAlignment="Center">
                <telerik:RadButton Width="38" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                                   Command="{Binding AddNewCommand}">
                    <telerik:RadButton.Content>
                        <Image Source="/Infrastructure;component/Images/MiniIcon/add.png" Height="14" Width="14"/>
                    </telerik:RadButton.Content>
                </telerik:RadButton>
                <TextBlock Text="Thêm mới câu lạc bộ" Foreground="#FF060606" FontSize="12" Margin="40 3 14 3" />
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="5" VerticalAlignment="Center">
                <telerik:RadButton Width="38" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
                                   Command="{Binding DeleteCommand}">
                    <telerik:RadButton.Content>
                        <Image Source="/Infrastructure;component/Images/MiniIcon/delete.png" Height="14" Width="14"/>
                    </telerik:RadButton.Content>
                </telerik:RadButton>
                <TextBlock Text="Xóa câu lạc bộ" Foreground="#FF060606" FontSize="12" Margin="40 3 14 3" />
            </StackPanel>
        </StackPanel>

        <telerik:RadGridView Grid.Row="2" Name="radGridView1" AutoGenerateColumns="False" ShowColumnHeaders="True" ShowGroupPanel="False" ShowInsertRow="false"
                             ItemsSource="{Binding List, Mode=TwoWay}"
                             SelectedItem="{Binding CurrentItem}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Tên câu lạc bộ" DataMemberBinding="{Binding TenGoi}" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

    </Grid>
</UserControl>
